Skip to content

Project drop-down refresh data fix#2810

Merged
DaanHoogland merged 1 commit into
apache:4.11from
ernjvr:projects-select
Aug 20, 2018
Merged

Project drop-down refresh data fix#2810
DaanHoogland merged 1 commit into
apache:4.11from
ernjvr:projects-select

Conversation

@ernjvr
Copy link
Copy Markdown
Contributor

@ernjvr ernjvr commented Aug 16, 2018

Description

In the UI, the 'Project' drop-down displays all the projects that the logged in user is a member of.
A regular user can add other accounts to a project when creating the project.
An Admin user can also add other accounts to an existing project.
When user 'x' adds account 'y' to a project 'z' and user 'y' is logged in to another session at the same time, the 'Project' drop-down in user 'y' session does not display project 'z' to which he/she has just been added as a member in the other session.
The latest project addition will only display in the drop-down if the user refreshes the HTML page.

Expected Behaviour:
Whenever user 'y' clicks on the drop-down to display the projects, it must include the newly added project 'z' without having to refresh the HTML page.
Whenever a user clicks on the 'Project' drop-down to display the projects he/she is a member of, Cloudstack must fetch the latest projects data from the database and repopulate the drop-down so that it displays all the up-to-date projects including projects that this user has been added to in other user sessions.

Current Behaviour:
Whenever user 'y' clicks on the drop-down to display the projects, it does not include the newly added project 'z' unless the HTML page is refreshed.

To Reproduce:
In the UI, log in as an Admin User. While logged in as an Admin User, also log in to another session as a different user.
Go back to the Admin User session and on the lefthand side, select the Projects link.
Create a new project or select an existing project. Add to the project the account belonging to the user that you used to log in to the other session.
After adding the account to the project in the Admin User session, go back to the added account user's session and click on the 'Project' drop-down in the top left corner. The drop-down will display all the projects that the user is a part of, except the project that he/she has just been added to in the Admin user's session.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

GitHub Issue/PRs

Screenshots (if appropriate):

image
image

How Has This Been Tested?

Manually (See screenshots above):

In the UI, log in as an Admin User. While logged in as an Admin User, also log in to another session as a different user.
Go back to the Admin User session and on the lefthand side, select the Projects link.
Create a new project or select an existing project. Add to the project the account belonging to the user that you used to log in to the other session.
After adding the account to the project in the Admin User session, go back to the added account user's session and click on the 'Project' drop-down in the top left corner. The drop-down will now display all the projects that the user is a part including the project that he/she has just been added to in the Admin user's session.

CloudStack version 4.11, KVM hypervisor.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
    Testing
  • I have added tests to cover my changes.
  • All relevant new and existing integration tests have passed.
  • A full integration testsuite with all test that can run on my environment has passed.

@ernjvr ernjvr changed the title project drop-down refresh data fix Project drop-down refresh data fix Aug 16, 2018
@ernjvr
Copy link
Copy Markdown
Contributor Author

ernjvr commented Aug 16, 2018

@houthuis @dhlaluku @rhtyd @rafaelweingartner , please review.

@dhlaluku
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@dhlaluku a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2255

@ernjvr ernjvr closed this Aug 17, 2018
@ernjvr ernjvr reopened this Aug 17, 2018
Copy link
Copy Markdown
Contributor

@dhlaluku dhlaluku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I have tested manually and I confirm that the functionality of this change adheres to the description.

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@DaanHoogland DaanHoogland merged commit 9b772db into apache:4.11 Aug 20, 2018
DaanHoogland pushed a commit that referenced this pull request Aug 20, 2018
* 4.11:
  populate project select when clicked on to display latest project options (#2810)
@yadvr yadvr added this to the 4.11.2.0 milestone Aug 20, 2018
@ernjvr ernjvr deleted the projects-select branch September 5, 2018 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants